<template>
  <div>error</div>
</template>

<script>

export default {
  name: 'SscReimburseApproveRedirect',
  data () {
    return {
      testFlag: false
    }
  },
  created () {
    // 判断是否需要跳转到制证页面
    console.log('URL======', window.location.href)
    let urlParam = this.$route.params.param
    console.log('urlParam------------------>', urlParam)
    let paramsArray = urlParam.split('&')
    console.log('---param----', urlParam)
    let hsInput = {}
    let type = ''
    for (var i = 0; i < paramsArray.length; i++) {
      let paramPair = paramsArray[i].split('=')
      console.log('biz paramPair->', paramPair)
      if (paramPair[0] === 'hsInput') {
        hsInput = JSON.parse(paramPair[1])
        console.log('approve page type hsInput->', hsInput)
      }
      if (paramPair[0] === 'type') {
        type = paramPair[1]
      }
    }
    if (type === 'approve' && hsInput.activityId === 'bpdid:e66881dc3b120578:-4ac08b22:1533523c9d7:-38ee') {
      this.$router.replace('/SscReimburseApproveFee/' + encodeURIComponent(urlParam))
      console.log('replace route end SscReimburseApproveFee!', '/SscReimburseApproveFee/' + encodeURIComponent(urlParam))
    } else {
      this.$router.replace('/SscReimburseApprove/' + encodeURIComponent(urlParam))
      console.log('replace route end SscReimburseApprove!', '/SscReimburseApprove/' + encodeURIComponent(urlParam))
    }
  }
}
</script>

<style scoped>
</style>
